/* =========================================================
   BRIEF INTERACTIVO EXEKILLER
========================================================= */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --fondo: #06070d;
  --superficie: rgba(255, 255, 255, 0.065);
  --superficie-fuerte: rgba(255, 255, 255, 0.105);
  --texto: #f7f8ff;
  --texto-suave: #b7bbcf;
  --borde: rgba(255, 255, 255, 0.14);
  --rosa: #ff2f7d;
  --morado: #8a5cff;
  --cyan: #00d5ff;
  --lima: #b7ff4a;
  --ambar: #ffb000;
  --sombra: 0 24px 80px rgba(0, 0, 0, 0.42);
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--texto);
  background:
    linear-gradient(135deg, rgba(255, 47, 125, 0.12), transparent 34%),
    linear-gradient(225deg, rgba(0, 213, 255, 0.12), transparent 38%),
    linear-gradient(180deg, #07070d 0%, #10111b 52%, #07070d 100%);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.85), transparent 82%);
}

.fondo-vivo {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
}

.haz,
.linea-luz {
  position: absolute;
  display: block;
  opacity: 0.7;
}

.haz {
  width: 78vw;
  height: 120px;
  background: linear-gradient(90deg, transparent, rgba(255, 47, 125, 0.24), rgba(0, 213, 255, 0.2), transparent);
  filter: blur(22px);
  transform: rotate(-14deg);
  animation: barridoColor 9s ease-in-out infinite;
}

.haz-uno {
  top: 7%;
  left: -20%;
}

.haz-dos {
  right: -22%;
  bottom: 18%;
  animation-delay: -4s;
  background: linear-gradient(90deg, transparent, rgba(183, 255, 74, 0.18), rgba(138, 92, 255, 0.22), transparent);
}

.linea-luz {
  width: 42vw;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  box-shadow: 0 0 22px rgba(0, 213, 255, 0.75);
  animation: pulsoLinea 4.5s ease-in-out infinite;
}

.linea-uno {
  top: 28%;
  right: 6%;
}

.linea-dos {
  left: 8%;
  bottom: 22%;
  background: linear-gradient(90deg, transparent, var(--rosa), transparent);
  box-shadow: 0 0 22px rgba(255, 47, 125, 0.75);
  animation-delay: -2s;
}

@keyframes barridoColor {
  0%, 100% {
    transform: translate3d(-20px, 0, 0) rotate(-14deg);
  }

  50% {
    transform: translate3d(50px, 22px, 0) rotate(-10deg);
  }
}

@keyframes pulsoLinea {
  0%, 100% {
    opacity: 0.24;
    transform: translateX(-14px);
  }

  50% {
    opacity: 0.82;
    transform: translateX(18px);
  }
}

/* =========================================================
   HERO
========================================================= */

.hero-formulario {
  width: min(1180px, calc(100% - 40px));
  margin: 28px auto 20px;
  min-height: 440px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 28px;
  align-items: stretch;
  position: relative;
}

.volver-portafolio {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--borde);
  border-radius: 8px;
  color: var(--texto);
  background: rgba(255, 255, 255, 0.07);
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.volver-portafolio:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 213, 255, 0.48);
  background: rgba(0, 213, 255, 0.12);
}

.hero-copy {
  padding-top: 86px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.eyebrow,
.panel-etiqueta,
.form-progress-label {
  color: var(--lima);
  font-size: 13px;
  line-height: 1.3;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
}

.hero-copy h1 {
  max-width: 720px;
  margin-top: 14px;
  font-size: 60px;
  line-height: 1;
  letter-spacing: 0;
}

.hero-copy p:last-child {
  max-width: 650px;
  margin-top: 18px;
  color: var(--texto-suave);
  font-size: 19px;
  line-height: 1.55;
}

.hero-visual {
  min-height: 380px;
  display: grid;
  place-items: center;
  position: relative;
}

.visual-canvas {
  width: min(100%, 430px);
  aspect-ratio: 1 / 1;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.018)),
    rgba(255, 255, 255, 0.035);
  box-shadow: var(--sombra);
  overflow: hidden;
}

.visual-canvas::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, transparent 0 18%, rgba(255, 47, 125, 0.22) 19% 22%, transparent 23% 48%, rgba(0, 213, 255, 0.2) 49% 52%, transparent 53%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 20px);
  animation: panelFlujo 8s linear infinite;
}

.mock-window {
  position: absolute;
  z-index: 2;
  width: 220px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(8, 10, 18, 0.86);
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.35);
  animation: flotarVentana 5.6s ease-in-out infinite;
}

.mock-window span {
  display: block;
  width: 48px;
  height: 7px;
  margin-bottom: 16px;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--rosa), var(--cyan));
}

.mock-window strong {
  display: block;
  font-size: 18px;
  margin-bottom: 8px;
}

.mock-window p {
  color: var(--texto-suave);
  line-height: 1.45;
  font-size: 13px;
}

.mock-principal {
  left: 42px;
  top: 72px;
}

.mock-secundaria {
  right: 34px;
  bottom: 68px;
  animation-delay: -2s;
}

.orbita {
  position: absolute;
  z-index: 1;
  width: 70%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(183, 255, 74, 0.9), transparent);
  box-shadow: 0 0 24px rgba(183, 255, 74, 0.36);
  animation: lineaRotativa 8s linear infinite;
}

.orbita-uno {
  top: 45%;
  left: 15%;
}

.orbita-dos {
  top: 57%;
  left: 15%;
  background: linear-gradient(90deg, transparent, rgba(255, 176, 0, 0.9), transparent);
  animation-direction: reverse;
}

@keyframes panelFlujo {
  from {
    transform: translateX(-28px);
  }

  to {
    transform: translateX(28px);
  }
}

@keyframes flotarVentana {
  0%, 100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-14px);
  }
}

@keyframes lineaRotativa {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* =========================================================
   LAYOUT
========================================================= */

.brief-layout {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto 80px;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.brief-panel {
  position: sticky;
  top: 18px;
  padding: 24px;
  border: 1px solid var(--borde);
  border-radius: 8px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.025)),
    rgba(7, 8, 14, 0.8);
  box-shadow: var(--sombra);
}

.brief-panel h2 {
  margin-top: 14px;
  font-size: 28px;
  line-height: 1.08;
}

.brief-panel p:not(.panel-etiqueta) {
  margin-top: 14px;
  color: var(--texto-suave);
  line-height: 1.55;
}

.progreso-panel {
  margin-top: 22px;
  display: grid;
  gap: 12px;
}

.spark-meter {
  height: 12px;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.spark-fill {
  display: block;
  width: var(--progreso);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--rosa), var(--cyan), var(--lima));
  box-shadow: 0 0 28px rgba(0, 213, 255, 0.4);
  transition: width 0.35s ease;
}

.form-progress-text {
  color: white;
  font-size: 14px;
}

.panel-puntos {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.panel-puntos span {
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: var(--texto-suave);
  background: rgba(255, 255, 255, 0.055);
  font-size: 12px;
  font-weight: 800;
}

form {
  min-width: 0;
}

.form-progress {
  position: sticky;
  top: 14px;
  z-index: 8;
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(8, 10, 18, 0.82);
  backdrop-filter: blur(16px);
}

.form-progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.form-progress-fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--rosa), var(--morado), var(--cyan), var(--lima));
  transition: width 0.35s ease;
}

.form-section {
  position: relative;
  margin-bottom: 18px;
  padding: 30px;
  border: 1px solid var(--borde);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.078), rgba(255, 255, 255, 0.022));
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.32);
  overflow: hidden;
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.55s ease, transform 0.55s ease, border-color 0.22s ease;
}

.form-section.visible {
  opacity: 1;
  transform: translateY(0);
}

.form-section:hover {
  border-color: rgba(0, 213, 255, 0.36);
}

.section-number {
  position: absolute;
  top: 20px;
  right: 22px;
  color: rgba(255, 255, 255, 0.1);
  font-size: 46px;
  font-weight: 900;
  line-height: 1;
}

.section-heading {
  max-width: 650px;
  margin-bottom: 22px;
}

.section-heading h2 {
  margin-top: 8px;
  font-size: 30px;
  line-height: 1.12;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.field-block {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.field-block span {
  color: var(--texto);
  font-weight: 900;
  font-size: 14px;
}

.field-wide {
  margin-bottom: 0;
}

input,
textarea {
  width: 100%;
  min-height: 52px;
  padding: 15px 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  color: var(--texto);
  background: rgba(255, 255, 255, 0.07);
  outline: none;
  font-family: inherit;
  font-size: 16px;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

textarea {
  min-height: 140px;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: rgba(247, 248, 255, 0.44);
}

input:focus,
textarea:focus {
  border-color: rgba(0, 213, 255, 0.72);
  background: rgba(255, 255, 255, 0.095);
  box-shadow: 0 0 0 4px rgba(0, 213, 255, 0.12);
}

.pregunta {
  position: relative;
  display: grid;
  gap: 14px;
  padding: 18px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.pregunta:first-of-type {
  border-top: none;
  padding-top: 0;
}

.pregunta p {
  color: var(--texto);
  font-size: 17px;
  line-height: 1.45;
  font-weight: 900;
}

.opciones-si-no {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.opciones-si-no label {
  position: relative;
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  color: var(--texto-suave);
  background: rgba(255, 255, 255, 0.055);
  font-weight: 900;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.opciones-si-no label::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.16), transparent);
  transform: translateX(-100%);
  transition: transform 0.42s ease;
}

.opciones-si-no label:hover {
  color: white;
  transform: translateY(-2px);
  border-color: rgba(255, 47, 125, 0.42);
  background: rgba(255, 47, 125, 0.12);
}

.opciones-si-no label:hover::before {
  transform: translateX(100%);
}

.opciones-si-no input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.opciones-si-no label:has(input:checked) {
  color: white;
  border-color: rgba(183, 255, 74, 0.58);
  background:
    linear-gradient(135deg, rgba(255, 47, 125, 0.34), rgba(0, 213, 255, 0.22)),
    rgba(255, 255, 255, 0.08);
  box-shadow: 0 14px 34px rgba(0, 213, 255, 0.14);
}

/* =========================================================
   SELECT PERSONALIZADO
========================================================= */

.custom-select {
  position: relative;
  width: 100%;
}

.custom-select-btn {
  width: 100%;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  color: var(--texto);
  background: rgba(255, 255, 255, 0.07);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.custom-select-btn:hover,
.custom-select.open .custom-select-btn {
  border-color: rgba(255, 47, 125, 0.62);
  background: rgba(255, 255, 255, 0.095);
  box-shadow: 0 0 0 4px rgba(255, 47, 125, 0.11);
}

.custom-select-arrow {
  width: 12px;
  height: 12px;
  border-right: 3px solid var(--lima);
  border-bottom: 3px solid var(--lima);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}

.custom-select.open .custom-select-arrow {
  transform: rotate(225deg);
}

.custom-select-options {
  position: absolute;
  left: 0;
  top: calc(100% + 10px);
  z-index: 20;
  width: 100%;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(10, 12, 22, 0.98);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}

.custom-select.open .custom-select-options {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.custom-select-options button {
  width: 100%;
  min-height: 46px;
  display: block;
  padding: 12px 14px;
  margin-bottom: 6px;
  border: 0;
  border-radius: 8px;
  color: var(--texto-suave);
  background: transparent;
  text-align: left;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.custom-select-options button:last-child {
  margin-bottom: 0;
}

.custom-select-options button:hover,
.custom-select-options button.selected {
  color: white;
  background: linear-gradient(135deg, rgba(255, 47, 125, 0.85), rgba(138, 92, 255, 0.72));
  transform: translateX(4px);
}

.select-error {
  display: none;
  margin-top: 10px;
  color: #ff8aae;
  font-size: 14px;
  font-weight: 900;
}

.select-error.visible {
  display: block;
}

.custom-select.error .custom-select-btn {
  border-color: #ff477e;
  box-shadow: 0 0 0 4px rgba(255, 71, 126, 0.14);
}

/* =========================================================
   ENVIO Y MENSAJE
========================================================= */

.submit-brief {
  width: 100%;
  min-height: 70px;
  display: grid;
  gap: 4px;
  place-items: center;
  margin-top: 18px;
  padding: 16px 22px;
  border: 0;
  border-radius: 8px;
  color: #071017;
  background: linear-gradient(120deg, var(--lima), var(--cyan), var(--rosa), var(--ambar));
  background-size: 300% 300%;
  font: inherit;
  cursor: pointer;
  box-shadow: 0 18px 44px rgba(0, 213, 255, 0.24);
  animation: botonFluido 5s ease-in-out infinite;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.submit-brief span {
  font-size: 17px;
  font-weight: 900;
}

.submit-brief small {
  font-size: 12px;
  font-weight: 800;
  color: rgba(7, 16, 23, 0.78);
}

.submit-brief:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 62px rgba(255, 47, 125, 0.26);
}

.submit-brief:disabled {
  cursor: wait;
  filter: grayscale(0.2);
  opacity: 0.8;
}

@keyframes botonFluido {
  0%, 100% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }
}

.mensaje-exito {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(4, 5, 10, 0.76);
  backdrop-filter: blur(14px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.mensaje-exito.visible {
  opacity: 1;
  visibility: visible;
}

.mensaje-exito-card {
  width: min(430px, 100%);
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.035)),
    #0b0d15;
  box-shadow: var(--sombra);
  transform: translateY(16px);
  transition: transform 0.25s ease;
}

.mensaje-exito.visible .mensaje-exito-card {
  transform: translateY(0);
}

.mensaje-exito-card strong {
  display: block;
  color: var(--lima);
  font-size: 24px;
  margin-bottom: 10px;
}

.mensaje-exito-card p {
  color: var(--texto-suave);
  line-height: 1.55;
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 980px) {
  .hero-formulario,
  .brief-layout {
    grid-template-columns: 1fr;
  }

  .hero-formulario {
    min-height: auto;
  }

  .brief-panel {
    position: static;
    order: -1;
  }

  .hero-copy h1 {
    font-size: 48px;
  }

  .hero-visual {
    min-height: 310px;
  }
}

@media (max-width: 680px) {
  .hero-formulario,
  .brief-layout {
    width: min(100% - 28px, 1180px);
  }

  .hero-copy {
    padding-top: 76px;
  }

  .hero-copy h1 {
    font-size: 38px;
  }

  .hero-copy p:last-child {
    font-size: 16px;
  }

  .visual-canvas {
    width: min(100%, 330px);
  }

  .mock-window {
    width: 190px;
  }

  .field-grid,
  .opciones-si-no {
    grid-template-columns: 1fr;
  }

  .form-section {
    padding: 22px;
  }

  .section-number {
    font-size: 34px;
  }

  .section-heading h2 {
    font-size: 25px;
  }
}

@media (max-width: 460px) {
  .hero-copy h1 {
    font-size: 33px;
  }

  .hero-visual {
    display: none;
  }

  .form-progress {
    top: 8px;
  }

  input,
  textarea,
  .custom-select-btn {
    font-size: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .form-section {
    opacity: 1;
    transform: none;
  }
}
